package com.mihoyo.genshin.controller;

import com.mihoyo.framework.result.Result;
import com.mihoyo.framework.web.Results;
import com.mihoyo.genshin.dto.req.UserRegisterReqDTO;
import com.mihoyo.genshin.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author keeng
 * @since 2025/5/23
 */
@RestController
@RequiredArgsConstructor
@Tag(name = "用户接口", description = "用户接口")
@RequestMapping("/user")
public class UserController {

	private final UserService userService;
	@PostMapping("/register")
	@Operation(summary = "用户注册")
	public Result<Void> register(@RequestBody UserRegisterReqDTO requestParam) {
		userService.register(requestParam);
		return Results.success();
	}

}
